package com.zt.yongxinbao.mapper;

import com.zt.yongxinbao.dto.PolicyParam;
import com.zt.yongxinbao.entity.UserPolicy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface UserPolicyMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserPolicy record);

    int insertSelective(UserPolicy record);

    UserPolicy selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserPolicy record);

    int updateByPrimaryKey(UserPolicy record);
//    根据用户名查询保单
    List<PolicyParam> selectByUsername(String username);
//    根据id更新保单到期时间
    int updateById(@Param("id") Integer id,@Param("time") Integer time);
}